<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('查看产品信息')" />
    <th:block th:include="include :: ztree-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-manage-add" th:object="${manage}">
        <div class="form-group">
            <label class="col-sm-3 control-label ">型号：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" readonly="readonly" name="manageId" id="manageId" th:field="*{manageId}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">品名：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" readonly="readonly" name="manageName" id="manageName" th:field="*{manageName}" required>
            </div>
        </div>
        <div class="form-group">
              <label class="col-sm-3 control-label">展示：</label>
              <div class="col-sm-8">
                  <img th:src="${manage.manageImg}"  id="manageImg" width="50%" height="50%"/>
              </div>
        </div>

        <div class="form-group">
            <label class="col-sm-3 control-label">类别：</label>
            <div class="col-sm-8">
                <select class="form-control noselect2 selectpicker" name="manageCategory" id="manageCategory" >
                    <option value="1" th:selected="${manage.manageCategory == 1 ? true : false}">家具</option>
                    <option value="2" th:selected="${manage.manageCategory == 2 ? true : false}">饰品</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">系列： </label>
            <div class="col-sm-8">
                <select class="form-control noselect2 selectpicker" id="seriesId" name="seriesId" >
                    <option value="">请选择系列</option>
                    <option th:each="dict : ${series}" th:text="${dict.seriesName}" th:value="${dict.seriesId}" th:selected="${manage.seriesId ==  dict.seriesId  ? true : false}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">风格： </label>
            <div class="col-sm-8">
                <select class="form-control noselect2 selectpicker" id="styleId" name="styleId" >
                    <option value="">请选择风格</option>
                    <option th:each="dict : ${style}" th:text="${dict.styleName}" th:value="${dict.styleId}" th:selected="${manage.styleId == dict.styleId ? true : false}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">规格： </label>
            <div class="col-sm-8">
                <select class="form-control noselect2 selectpicker" id="speId" name="speId" >
                    <option value="">请选择系列</option>
                    <option th:each="dict : ${specification}" th:text="${dict.speName}" th:value="${dict.speId}" th:selected="${manage.speId == dict.speId ? true : false}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">材质：</label>
            <div class="col-sm-8">
                <select class="form-control noselect2 selectpicker" name="manageTexture" id="manageTexture">
                    <option value="1" th:selected="${manage.manageTexture == 1 ? true : false}">面料</option>
                    <option value="2" th:selected="${manage.manageTexture == 2 ? true : false}">五金件</option>
                    <option value="3" th:selected="${manage.manageTexture == 3 ? true : false}">木饰面</option>
                    <option value="4" th:selected="${manage.manageTexture == 4 ? true : false}">油漆</option>
                    <option value="5" th:selected="${manage.manageTexture == 5 ? true : false}">其他</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">产地：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="manageOrigin" readonly="readonly" id="manageOrigin" th:field="*{manageOrigin}"  required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">单价：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="managePrice" readonly="readonly" id="managePrice" th:field="*{managePrice}"   required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">数量：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="manageNumber" readonly="readonly" id="manageNumber" th:field="*{manageNumber}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">金额：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="manageMoney" readonly="readonly" id="manageMoney" th:field="*{manageMoney}" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注：</label>
            <div class="col-sm-8">
                <textarea id="manageDesc" name="manageDesc" class="form-control" readonly="readonly" th:field="*{manageDesc}" >[[*{manageDesc}]]</textarea>
            </div>
        </div>

    </form>
</div>
<th:block th:include="include :: footer" />
<script type="text/javascript">

    var perImg = ctx + "img/";

    /* 获取src值 */
    var imgSrc = $("#manageImg").attr("src");

    /* 填充src值 */
    $("#manageImg").attr("src",perImg + imgSrc);

</script>
</body>
</html>
